/**
 *	定义基础方法Flow扩展
 *	开发者：雨中磐石
 *	地址：www.rockoa.com
 *	日期：2023-07-21
 */

package com.framework.Flow;

import com.framerock.db.DBConn;
import com.framerock.server.Request;


/**
 * 定义基础方法Flow扩展
 * */
public class FlowBase {

    /**
     * 流程主Flow
     * */
    protected Flow mFlow;
    protected Request mRequest;
    protected DBConn nDb;

    /**
     * 单位ID
     * */
    protected String COMPANYID = "0";

    public FlowBase(Flow flows){
        mFlow           = flows;
        this.nDb        = mFlow.nDb;
        this.mRequest   = mFlow.mRequest;
        this.COMPANYID  = this.mRequest.COMPANYID;
    }


    //详情的
    private FlowXiang mFlowXiang = null;
    public FlowXiang Xiang()
    {
        if(mFlowXiang == null)mFlowXiang = new FlowXiang(mFlow);
        return mFlowXiang;
    }

    //数据源
    private FlowStore mFlowStore = null;
    public FlowStore Store()
    {
        if(mFlowStore == null)mFlowStore = new FlowStore(mFlow);
        return mFlowStore;
    }

    //列表页
    private FlowList mFlowList = null;
    public FlowList List()
    {
        if(mFlowList == null)mFlowList = new FlowList(mFlow);
        return mFlowList;
    }

    //权限
    private FlowAuth mFlowAuth = null;
    public FlowAuth Auth()
    {
        if(mFlowAuth == null)mFlowAuth = new FlowAuth(mFlow);
        return mFlowAuth;
    }

    //录入
    private FlowInput mFlowInput = null;
    public FlowInput Input()
    {
        if(mFlowInput == null)mFlowInput = new FlowInput(mFlow);
        return mFlowInput;
    }

    //单位操作时
    private FlowUnit mFlowUnit = null;
    public FlowUnit Unit()
    {
        if(mFlowUnit == null)mFlowUnit = new FlowUnit(mFlow);
        return mFlowUnit;
    }


    private FlowWhere mFlowWhere = null;
    /**
     * 模块条件
     * */
    public FlowWhere Where()
    {
        if(mFlowWhere == null)mFlowWhere = new FlowWhere(mFlow);
        return mFlowWhere;
    }


    private FlowLog mFlowLog = null;
    /**
     * 操作记录
     * */
    public FlowLog Log()
    {
        if(mFlowLog == null)mFlowLog = new FlowLog(mFlow);
        return mFlowLog;
    }



    private FlowTodo mFlowTodo = null;
    /**
     * 通知使用
     * */
    public FlowTodo Todo()
    {
        if(mFlowTodo == null)mFlowTodo = new FlowTodo(mFlow);
        return mFlowTodo;
    }

    private FlowCourse mFlowCourse = null;
    /**
     * 流程审核步骤处理
     * */
    public FlowCourse Course()
    {
        if(mFlowCourse == null)mFlowCourse = new FlowCourse(mFlow);
        return mFlowCourse;
    }

    private FlowBill mFlowBill = null;
    /**
     * 流程单据处理
     * */
    public FlowBill Bill()
    {
        if(mFlowBill == null)mFlowBill = new FlowBill(mFlow);
        return mFlowBill;
    }
}
